package com.jk.springbootes.controller;

import com.jk.springbootes.entity.TestEntity;
import com.jk.springbootes.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 赵优秀
 * @version 1.0.0
 * @ClassName testController.java
 * @Description TODO
 * @createTime 2021年08月29日 19:32:00
 */
@RestController
public class testController {
    @Autowired
    private TestService testService;

    //新增
    @RequestMapping("add")
    public  void  add(TestEntity entity){
        testService.add(entity);
    }
    //查询所有
    @RequestMapping("findTest")
    public List<TestEntity> findTest(){
        return testService.findTest();
    }
}
